﻿/*

DECLARE @EnterpriseID AS BIGINT

SET @EnterpriseID = (SELECT Ent_ID FROM [esf_sso].[VEnterprise] WHERE Ent_Code = 'ESF')

DECLARE @RootUserID BIGINT

SET @RootUserID = (SELECT PersonID FROM [esf_sso].[User] WHERE [Alias] = 'root')


-- ===============================================================================================
-- User Menus para ESF.SSO.Client
-- ===============================================================================================

IF NOT EXISTS (SELECT ID FROM esf_sso.VApplication WHERE Code = 'ESF.SSO.Client')
BEGIN
	INSERT INTO [esf_sso].[BasicReference] ([BasicReferenceTypeID],[Code],[Name],[Description],[IsEnabled],[CreationDateTime], UserCreationAlias, Extra_I)
	SELECT 4, 'ESF.SSO.Client', 'Opciones Publicas', NULL, 1, GETDATE (),'root', 'http://sso.sunnysys.com/Client/'
END

DECLARE @xID INT

-- Reinsertar las referencias basicas
EXEC [esf_sso].P_CreateAsignUserMenu @xID OUT, 'ESF.SSO.Client', 'Public', NULL, 'ESF.SSO.Client_Inicio', 'Principal', NULL, NULL, '/'
EXEC [esf_sso].P_CreateAsignUserMenu @xID OUT, 'ESF.SSO.Client', 'Public', NULL, 'ESF.SSO.Client_Registrarse', 'Registrarse', NULL, NULL, 'SignUp.aspx'
EXEC [esf_sso].P_CreateAsignUserMenu @xID OUT, 'ESF.SSO.Client', 'Public', NULL, 'ESF.SSO.Client_Contactenos', 'Contáctenos', NULL, NULL, 'ContactUs.aspx'
EXEC [esf_sso].P_CreateAsignUserMenu @xID OUT, 'ESF.SSO.Client', 'Public', NULL, 'ESF.SSO.Client_MisContactenos', 'Mis Solicitudes', NULL, NULL, 'ContactUsLog.aspx'

*/